<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<?php
$server = "localhost";
$username = "root";
$pwd = "root";
$db = "tawuz";

$con = mysqli_connect($server, $username, $pwd, $db);

if ($con) {
    $id = $_GET['id'];
    $sql = "select * from student where id=" . $id;
    $run = mysqli_query($con, $sql);
    if ($run && mysqli_num_rows($run) > 0) {
        $kur = mysqli_fetch_assoc($run);
    }
} else {
    echo "未连接数据库，错误内容：" . mysqli_connect_error();
}

?>

<form action="abdullauqun2.php" method="post">
    <input type="hidden" name="id" value="<? echo $id??'0' ?>">
    姓名：<input type="text" name="uname" value="<? echo $kur['uname'] ?>">
    年龄：<input type="text" name="uage" value="<? echo $kur['uage'] ?>">
    地址：<input type="text" name="uads" value="<? echo $kur['uads'] ?>">
    <input type="submit">
</form>
</body>
</html>